Skip to content

Conversation

@carlpulley-da
Copy link
Contributor

@carlpulley-da carlpulley-da commented Jan 12, 2026

Plan is to use a separate PR (#22619) for removing remaining daml side admin client references to multi-participant code

(_, participantNames @ ValueList(vs)),
),
) =>
) if vs.length <= 1 =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to allow for an empty list case as well as the singleton list case (since daml-script tests sometimes use an empty list)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please (if you havent already) verify this is backwards compatible manually, i.e. build a script dar with some 3.4 version and run it (via dpm script --dar <my-dar> --all --ide-ledger) using HEAD of main

}
} yield AllocParty(idHint, allocArg)
} yield AllocParty(idHint, participantNames.headOption)
case ValueRecord(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure all other AllocParty payloads result in a non-generic error message

)
.participantUid
override def getParticipantUid()(implicit ec: ExecutionContext): Future[String] =
grpcClient.partyManagementClient.getParticipantId().map(_.asInstanceOf[String])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As other methods requiring a participantUid work with a string, we also do the same here

None,
PureCompiledPackages.Empty(defaultCompilerConfig),
)
defaultParticipantUid <- ledgerClient.getParticipantUid()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for vetting

.map(dep => ScriptLedgerClient.ReadablePackageId.assertFromString(dep.versionedName))
.toList
_ <- ledgerClient.vetPackages(pkgs)
_ <- ledgerClient.waitUntilVettingVisible(pkgs, defaultParticipantUid)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this sufficient? Or do we need to iterate over all participants waiting for vetting visibility?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you only wait on one, it might be flaky.

@carlpulley-da carlpulley-da marked this pull request as ready for review January 12, 2026 17:13
@carlpulley-da carlpulley-da requested review from a team, paulbrauner-da and samuel-williams-da and removed request for samuel-williams-da January 12, 2026 17:13
Copy link
Contributor

@samuel-williams-da samuel-williams-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In PartyManagement.daml, could you revert the AllocateParty datatype back to how it looked before Pauls changes?
i.e.

data AllocateParty = AllocateParty with
  requestedName: Text
  idHint : Text
  participant : Optional Text
instance IsQuestion AllocateParty Party where command = "AllocateParty"

instead of how it currently is:

data AllocateParty = AllocateParty with
  requestedName: Text
  idHint : Text
  participants : [Text]
-- | HIDE
instance IsQuestion AllocateParty Party
  where
    command = "AllocateParty"
    version = 2

and make sure the comment is correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants